<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .text {
      display: inline-block;


      /* width: 60px;
      height: 30px; */

      inline-size: 60px;
      block-size: 30px;
      padding-block: 10px;

      /* padding: 10px 0px; */
      writing-mode: vertical-lr;
      

      text-align: center;
      background-color: black;
      color: #fff;
    }
  </style>
</head>
<body>
    <div class="text">test</div>
</body>
</html>